package ui

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/container"
	"github.com/yourusername/tinput/internal/ui/pages"
)

// NewMainWindow 创建主窗口
func NewMainWindow(app fyne.App) fyne.Window {
	// 创建主窗口
	window := app.NewWindow("FixLang")
	window.Resize(fyne.NewSize(800, 600))

	// 创建标签页容器
	tabs := container.NewAppTabs(
		container.NewTabItem("Fix", pages.NewInputPage(window)),
		container.NewTabItem("History", pages.NewHistoryPage(window)),
		container.NewTabItem("Config", pages.NewConfigPage(window)),
	)

	// 设置窗口内容
	window.SetContent(tabs)

	// 显示窗口
	window.Show()

	return window
}
